<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>

<style type="text/css">
    * { margin: 0px; padding: 0px; }

    table {
        border-color: #000;
        text-align: center;
        background-color: black;
    }

    #firstLine {
        background-color: aqua;
    }

    .otherLine {
        background-color: white;
    }

    #blank {
        width: 1024px;
        height: 50px;
    }

    #header {
        /*border:1px solid #000;*/
        margin: 0 auto;
        height: 30px;
        width: 1024px;
        overflow: hidden;
    }

    #main {
        margin: 0 auto;
        width: 1024px;
    }

    #divFind {
        float: left;
    }

    #inputDiv {
        float: right;
    }

    input {
        cursor: pointer;
        background-color: greenyellow;
    }

    #Find {
        cursor: text;
        font-size: 16px;
        width: 200px;
        height: 22px;
        background-color: antiquewhite;
    }

    div > input {
        border: 1px solid #000;
        width: 80px;
    }

    td > input {
        border: 0px;
        width: 80px;
    }
</style>
<script type="text/javascript">
    window.onload = function myLoad() {
        window.document.getElementById("buttonInput").onclick = function toAdd() {
            window.location.href = "/examStudent/toAdd.do";
        }
        window.document.getElementById("buttonFind").onclick = function doFind() {
            var findValue = document.getElementById("Find").value;
            window.location.href = "/examStudent/doFind.do?findValue=" + findValue;
        }

    }

</script>
<div id="blank"></div>
<div id="header">
    <div id="divFind">
        <input type="text" id="Find" name="Find" value="">
        <input type="button" id="buttonFind" name="buttonFind" value="查找">
    </div>
    <div id="inputDiv">
        <input type="button" id="buttonInput" name="buttonInput" value="添加" />
    </div>
</div>
<div id="main">
    <table width="1024" bgcolor="black" border="1" cellpadding="1" cellspacing="0">

        <tr id="firstLine">
            <td>姓名</td>
            <td>学号</td>
            <td>性别</td>
            <td>出生日期</td>
            <td>班级</td>
            <td colspan="2">操作</td>
        </tr>

        <c:forEach var="examStudents" items="${examStudents}" varStatus="status">
            <tr class="otherLine">
                <td id="examStudentsName${status.index}">
                    <c:out value="${examStudents.name}" />
                </td>
                <td id="examStudentsCode${status.index}">
                    <c:out value="${examStudents.code}" />
                </td>
                <td>
                    <c:choose>
                        <c:when test="${examStudents.sex=='1'}">男</c:when>
                        <c:otherwise>女</c:otherwise>
                    </c:choose>
                </td>
                <td>
                    <c:out value="${examStudents.bornDate}" />
                </td>
                <td>
                    <c:out value="${examStudents.examClass.name}" />
                </td>
                <td width="80" bgcolor="#adff2f">
                    <input type="button" class="buttonEdit" name="buttonEdit" value="编辑"
                           onclick="window.location.href='/examStudent/edit.do?id=${examStudents.id}'" />
                </td>
                <td width="80" bgcolor="#adff2f">
                    <input type="button" class="buttonSchedule" name="buttonSchedule" value="日程"
                           onclick="window.location.href='/examStudent/schedule.do?id=${examStudents.id}'" />
                </td>
            </tr>
        </c:forEach>


    </table>
</div>